<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>主页</title>
    <script src="https://og6593g2z.qnssl.com/fundebug.0.3.3.min.js" apikey="f425f662987ebb7ba8943b7db3a296603e9d5a91ad9fefd25f16a1923106bf9a"></script>
    <script src="__LAYUI__/layui.js"></script>
    <link href="__LAYUI__/css/layui.css" rel="stylesheet"/>
    <link href="__CSS__/index.css" rel="stylesheet"/>
    <style>
        .layui-tab-item {
            width: 100%;
            height: 100%;
        }

        .frame {
            height: 100%;
            width: 100%;
        }

        .dis {
            display: none;
        }
    </style>
</head>
<body>
<div id="header" class="layui-header head">
    <div class="layui-main">
        <a style="position: absolute;left: 0;top: 16px;" href="#">
            <img style="height: 81px;display: inline-block;border: none;"
                 src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=113436625,2630828831&fm=27&gp=0.jpg">
        </a>
        <div style="padding-top: 51px">
            <ul class="layui-nav" style="right: 0; position: absolute;" lay-filter="filter">
                <li class="layui-nav-item layui-this"><a href="javascript:void(0);">{$username}</a></li>
                <li class="layui-nav-item" name="modify"><a href="javascript:void(0);">修改密码</a></li>
                <li class="layui-nav-item" name="exit"><a href="javascript:void(0);">退出</a></li>
            </ul>
        </div>
    </div>
</div>


<div class="layui-tab layui-tab-brief " lay-filter="Tab" style="height: 670px">
    <ul class="layui-tab-title">
        <li class="layui-this">图书</li>
        <li class="">专著</li>
        <li class="">专著录入</li>
        <li class="">文件</li>
        <li class="">核心期刊</li>
    </ul>
    <div class="layui-tab-content tab-item" style="height: 100%;">

        <div class="layui-tab-item layui-show tab-item">
            <div class="layui-container" style="height: 100%">
                <div class="layui-row" style="height: 100%">
                    <div class="layui-col-md" style="height: 100%">
                        <iframe src="/index/Material" class="frame" frameborder="0" scrolling="no"></iframe>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-tab-item tab-item">
            <div class="layui-container" style="height: 100%">
                <div class="layui-row" style="height: 100%">
                    <div class="layui-col-md" style="height: 100%">
                        <iframe src="/index/Sta/manageMonograph" class="frame" frameborder="0" scrolling="no"></iframe>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-tab-item tab-item">
            <div class="layui-container" style="height: 100%">
                <div class="layui-row" style="height: 100%">
                    <div class="layui-col-md" style="height: 100%">
                        <iframe src="/index/input/monograph" class="frame" frameborder="0" scrolling="no"></iframe>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-tab-item tab-item">
            <div class="layui-container" style="height: 100%">
                <div class="layui-row" style="height: 100%">
                    <div class="layui-col-md" style="height: 100%">
                        <iframe src="/index/Uploader" class="frame" frameborder="0" scrolling="no"></iframe>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-tab-item tab-item">
            <div class="layui-container" style="height: 100%">
                <div class="layui-row" style="height: 100%">
                    <div class="layui-col-md" style="height: 100%">
                        <iframe src="/index/Magazine" class="frame" frameborder="0" scrolling="no"></iframe>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use(['laydate', 'element', 'jquery', 'layer'], function () {
        var element = layui.element
            , $ = layui.$ //重点处
            , layer = layui.layer;
        var laydate = layui.laydate;

        element.on('nav(filter)', function (data) {
            var att = data.attr('name');
            if (att == 'exit') {
                $.ajax({
                    type: "post",
                    url: 'userExit',
                    success: function (data) {
                        if (!data) {
                            layer.msg('账号已退出', {
                                icon: 1,
                                time: 3000 //2秒关闭（如果不配置，默认是3秒）
                            });
                            window.location.href = '/';
                        }
                    }
                });
            }
            if (att == 'modify') {
                layer.open({
                    type: 2,
                    title: '修改密码',
                    scrollbar: false,
                    resize: false,
                    area: ['400px', '200px'],
                    shadeClose: true,
                    content: ['/index/input/modify', 'no'],
                });
            }
        });
    });
</script>


<script type="text/javascript">
    var username = window.localStorage.getItem("username");
</script>
</body>
</html>